package com.sinosoft.perfect.system._authorization.dao;

import java.sql.SQLException;
import java.util.List;

import com.sinosoft.perfect.system._.po.TUserRolesysRelation;

public interface IUserRolesysAuthorizeDao {
	
	public void insertByTUserRolesysRelation(TUserRolesysRelation tuserRolesysRelation) throws SQLException;
	
	public List<TUserRolesysRelation> queryRolesystemsOfUser(String userId) throws SQLException;
	
	public List<String> queryUserIdsOfUnit(String unitId) throws SQLException;
	
	public int deleteRolesystemRelationsByUser(String userId) throws SQLException;
	
	public int deleteRolesystemRelationsByUsersOfUnit(String unitId) throws SQLException;
	
	public void delAllRolesOfUserAndAddUserRoles(String userId, List<TUserRolesysRelation> tuserRolesysRelations) throws SQLException;
	
	public void delAllRoleUsersOfUnitAndAddUsersRoleOfUnit(String unitId, List<TUserRolesysRelation> tuserRolesysRelations) throws SQLException;
	
	public void deleteTUserRolesysRelation(TUserRolesysRelation tUserRolesysRelation) throws SQLException;
}
